package com.yidu.dao;

import java.util.List;
import java.util.Map;

import com.yidu.domain.ListenFinance;
import com.yidu.domain.ListenPurchase;
import com.yidu.domain.ListenReturnGoods;
import com.yidu.domain.ListenStock;

public interface ListenReturnGoodsMapper {
    int deleteByPrimaryKey(String rgId);

    int insert(ListenReturnGoods record);

    int insertSelective(ListenReturnGoods record);

    ListenReturnGoods selectByPrimaryKey(String rgId);

    int updateByPrimaryKeySelective(ListenReturnGoods record);

    int updateByPrimaryKey(ListenReturnGoods record);
    
    List<ListenPurchase> selectAll(Map<String, Object> map);
    
    int selectAllRows(Map<String, Object> map);
    
    List<ListenReturnGoods> selectReturnAll(Map<String, Object> map);
    

    int selectReturnCount(Map<String, Object> map);
    
    
    /**
     * 添加库存数量
     * @param listenStock
     * @return
     */
    int updateAddNumber(ListenStock listenStock);
    

    /**
     * 减少库存数量
     * @param listenStock
     * @return
     */
    int updateMinusNumber(ListenStock listenStock);
    
    /**
     * 添加公司财务
     * @param finance
     * @return
     */
    int updateAddMoney(ListenFinance finance);
    
    /**
     * 减少公司财务
     * @param finance
     * @return
     */
    int updateMinusMoney(ListenFinance finance);
}